import request from '@/utils/request'
// 查询业内资料目录-详情详细
export function getDetail(id) {
  return request({
    url: '/infor/infor/' + id,
    method: 'get'
  })
}
// 新增业内资料目录
export function addDetail(data) {
  return request({
    url: '/infor/infor',
    method: 'post',
    data: data
  })
}
// 新增下级
export function submitFormAdd(data) {
  let id = data.parentId
  delete data.id
  return request({
    url: '/infor/infor/createJunior/' + id,
    method: 'post',
    data: data,
    params:id
  })
}
// 修改业内资料目录
export function updateDetail(data) {
  return request({
    url: '/infor/infor',
    method: 'put',
    data: data
  })
}
// 删除业内资料目录-详情
export function delDetail(id) {
  return request({
    url: '/infor/infor/' + id,
    method: 'delete'
  })
}
// 关联附件和业内资料目录详情
export function relateDetailAttaches(data) {
  return request({
    url: '/infor/infor/relateAttaches',
    method: 'post',
    data: data
  })
}